/* stack 遍历 */
#include <iostream>
#include <stack>

using namespace std;

int main(int argc, char **argv)
{

    stack<int> s;

    s.push(10);
    s.push(20);
    s.push(30);
    s.push(40);
    s.push(50);

    cout << "stack size: " << s.size() << endl;
    

    while (!s.empty())
    {
        cout << s.top() << endl;
        s.pop();
    }



    return 0;
}